package com.spider.admin.service.apimarks;

import com.spider.admin.exception.SpiderException;
import com.spider.admin.store.primary.model.AccountServicePerm;
import com.spider.admin.store.primary.model.ServiceInfo;
import com.spider.admin.store.primary.model.TenantAndAppInfo;

import java.util.List;

public interface ApiMarksService {
    List<TenantAndAppInfo> getAll(String tenantId)throws SpiderException;

    /**
     * 获取服务清单
     * @param gId
     * @param type
     * @return
     */
    List<ServiceInfo> getServiceList(String gId,String account, String type)throws SpiderException ;

    /**
     * 订阅服务
     * @param accountServicePerm
     * @return
     * @throws SpiderException
     */
    boolean subjectService(AccountServicePerm accountServicePerm)throws SpiderException;

    /**
     * 取消订阅服务
     * @param serviceId
     * @param account
     * @return
     */
    boolean unSubjectService(String serviceId, String account)throws SpiderException;

    List<ServiceInfo> getAccountServiceList(String gId, String account, String type);
}
